/////////////////////////////////////////////////////////////////////
//
// \author Jeongnim Kim  jnkim@ncsa.uiuc.edu
//
// Measuring abstraction penalty using TinyVector and Vector based on PETE
// src/PETE      (copy of PETE library http://www.acl.lanl.gov)
// src/OhmmsPETE (Ohmms implementation of a fixed vector and an array)
//////////////////////////////////////////////////////////////////////
#include "benchmark/vector_bench.h"
using namespace APPNAMESPACE;
using namespace std;

int main(int argc, char **argv) {

  OhmmsInfo ohmms(argc,argv);

  typedef TinyVector<double,QMC_DIM> Pos_t;
  typedef Vector<Pos_t> PosArray_t;  
  typedef Vector<double> ValArray_t;

  int n=10;
  int i=0;
  std::string help("ohmms");
  int niter=5;
  while(i<argc) {
    std::string a(argv[i]);
    if(a == "-n"){
      n = atoi(argv[++i]);
    } else if(a == "-i") {
      niter = atoi(argv[++i]);
    } else if(a == "-c") {
      help = argv[++i];
    }
    i++;
  }

  if(argc<2) {
    cout << endl << "Using default size = " << n << endl;
    niter = 1000;
    cout << endl << "usage: -n size -i iteration -c keyword" << endl;
  }

  VectorAbstraction<Pos_t,PosArray_t,ValArray_t> benchmarker(help);
  benchmarker.run(n,niter);
}

/***************************************************************************
 * $RCSfile: ohmms.cpp,v $   $Author: jnkim $
 * $Revision: 1.2 $   $Date: 2005/12/11 15:28:52 $
 * $Id: ohmms.cpp,v 1.2 2005/12/11 15:28:52 jnkim Exp $
 ************************************************************************/
